package com.boco.fznq.welcome;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

import com.boco.fznq.AppConstants;
import com.boco.fznq.R;
import com.boco.fznq.main.MainActivity;
import com.culiu.core.activity.BaseCoreActivity;

/**
 * Created by jiangcheng on 2016/12/12.
 */

public class SplashActivity extends BaseCoreActivity {



    public static final int GOMAIN_MSG = 0X112;


    private Handler mHandler = new Handler() {
        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
            if (msg.what == GOMAIN_MSG) {
                Intent intent = new Intent(SplashActivity.this, MainActivity.class);
                SplashActivity.this.startActivity(intent);
                SplashActivity.this.finish();
            }
        }
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
        mHandler.sendEmptyMessageDelayed(GOMAIN_MSG, AppConstants.SPLASH_DELAY);

    }
    @Override
    public void showLoadingDialog() {

    }

    @Override
    public void dismissLoadingDialog() {

    }
}
